package br.com.acme.calculator;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class CelsiusToFahrenheitConverter {
	
	private BigDecimal factor = new BigDecimal("9").divide(new BigDecimal("5"), 2, RoundingMode.HALF_UP);

	public BigDecimal convert(BigDecimal degreesInCelsius){
		return degreesInCelsius.multiply(factor)
			   .setScale(2, RoundingMode.HALF_UP)
		       .add(new BigDecimal("32"))
		       .setScale(2, RoundingMode.HALF_UP);
	}
}
